API Documentation
Public Member Functions | List of all members
nkGraphics::RenderContextManager Class Referencefinal

Manages the rendering contexts available in the component. More...

Inheritance diagram for nkGraphics::RenderContextManager:

Public Member Functions

 ~RenderContextManager ()
 
const std::unordered_map< nkWinUi::GraphicsWindow *, RenderContext * > & getRenderContextMap () const
 
RenderContextgetRenderContextOf (nkWinUi::GraphicsWindow *win) const
 
RenderContextgetActiveRenderContext () const
 
RenderContextgetDefaultRenderContext () const
 
nkWinUi::GraphicsWindowgetWindowOf (RenderContext *context) const
 
RenderContextcreateRenderContextFor (nkWinUi::GraphicsWindow *win)
 
RenderContextcreateRenderContextAndWindow (const RenderContextDescriptor &contextDesc)
 
RenderContextcreateRenderContextAndWindowFromConfig ()
 
void activateContextOf (nkWinUi::GraphicsWindow *win)
 
void activateContext (RenderContext *context)
 
void eraseFor (nkWinUi::GraphicsWindow *win)
 

Detailed Description

Manages the rendering contexts available in the component.

The manager is responsible for the memory it allocates. External code should not delete it.

Constructor & Destructor Documentation

◆ ~RenderContextManager()

nkGraphics::RenderContextManager::~RenderContextManager ( )

Destructor.

Member Function Documentation

◆ getRenderContextMap()

const std::unordered_map<nkWinUi::GraphicsWindow*, RenderContext*>& nkGraphics::RenderContextManager::getRenderContextMap ( ) const
Returns
Internal context map, used for tracking.

◆ getRenderContextOf()

RenderContext* nkGraphics::RenderContextManager::getRenderContextOf ( nkWinUi::GraphicsWindow win) const

Retrieves the context associated to a window.

Parameters
winThe window which context is needed.
Returns
The context associated to given window if available, nullptr else.

◆ getActiveRenderContext()

RenderContext* nkGraphics::RenderContextManager::getActiveRenderContext ( ) const
Returns
The active render context.

◆ getDefaultRenderContext()

RenderContext* nkGraphics::RenderContextManager::getDefaultRenderContext ( ) const
Returns
The default render context.

◆ getWindowOf()

nkWinUi::GraphicsWindow* nkGraphics::RenderContextManager::getWindowOf ( RenderContext context) const

Retrieves the window associated to a context.

Parameters
contextThe context which window is needed.
Returns
The window associated to a context.

◆ createRenderContextFor()

RenderContext* nkGraphics::RenderContextManager::createRenderContextFor ( nkWinUi::GraphicsWindow win)

Creates a render context that will be attached to an external window.

Parameters
winThe external window to attach the render context to.
Returns
A freshly created context. The manager owns the memory, external code should not delete it.

◆ createRenderContextAndWindow()

RenderContext* nkGraphics::RenderContextManager::createRenderContextAndWindow ( const RenderContextDescriptor contextDesc)

Creates a render context and its associated window.

Parameters
contextDescThe description of the context to create.
Returns
A freshly created context. The manager owns the memory, external code should not delete it.

◆ createRenderContextAndWindowFromConfig()

RenderContext* nkGraphics::RenderContextManager::createRenderContextAndWindowFromConfig ( )

Creates a render context and its window, from the configuration currently set. See ConfigManager.

Returns
A freshly created context. The manager owns the memory, external code should not delete it.

◆ activateContextOf()

void nkGraphics::RenderContextManager::activateContextOf ( nkWinUi::GraphicsWindow win)

Activates a context and prepares the rendering pipeline for all its defined parameters.

Parameters
winThe window from which the context should be activated.

◆ activateContext()

void nkGraphics::RenderContextManager::activateContext ( RenderContext context)

Activates a context and prepares the rendering pipeline for all its defined parameters.

Parameters
contextThe context to activate.

◆ eraseFor()

void nkGraphics::RenderContextManager::eraseFor ( nkWinUi::GraphicsWindow win)

Erases and frees the memory of a context.

Parameters
winThe window from which the context should be deleted.

The documentation for this class was generated from the following file: